define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {

		//返回信息
		return {
			email_detail:function(callback){
				Http.post({
					method:'member.linkemail.detail'
				},function(result){
					if(callback)
					callback(result.result);
				})
			},
			send_email:function(passwrod,email,callback){
				Http.post({
					method:'member.linkemail.change',
					password:passwrod,
					email:email
				},function(result){
					if(callback)
					callback(result);
				})
			}
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Linkemail", factory);
});